package com.linkage.usercenter.controller;

import com.linkage.common.base.RequestInfo;
import com.linkage.common.base.ResponseInfo;
import com.linkage.usercenter.pojo.vo.*;
import com.linkage.usercenter.service.IInspectUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/exter")
public class ExterInspectController {

    private static final Logger logger = LoggerFactory.getLogger(ExterInspectController.class);

    @Autowired
    private IInspectUserService inspectUserService;


    //补充保安用户信息
    @RequestMapping(value = "/inspect/supplementUserInfo", method = RequestMethod.POST)
    public String supplementUserInfo(@RequestBody RequestInfo<InspectSecurityQUERY> query) {
        inspectUserService.supplementUserInfo(query);
        return ResponseInfo.success().toString();
    }

    //获取保安用户信息
    @RequestMapping(value = "/inspect/getInspectUserInfo", method = RequestMethod.POST)
    public String getInspectUserInfo(@RequestBody RequestInfo<InspectUserInfoQUERY> query) {
        InspectUserInfoVO vo = new InspectUserInfoVO();
        inspectUserService.getInspectUserInfo(query, vo);
        return ResponseInfo.success(vo).toString();
    }


    //提交保安核查信息
    @RequestMapping(value = "/inspect/submitInspectInfo", method = RequestMethod.POST)
    public String submitInspectInfo(@RequestBody RequestInfo<InspectSecurityInfoVO> query) {
        inspectUserService.submitInspectInfo(query);
        return ResponseInfo.success().toString();
    }
    //提交企业核查信息
    @RequestMapping(value = "/inspect/submitInspectEnter", method = RequestMethod.POST)
    public String submitInspectEnter(@RequestBody RequestInfo<InspectEnterpriseVO> query) {
        inspectUserService.submitInspectEnter(query);
        return ResponseInfo.success().toString();
    }



}
